﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="calltaxi.ascx.cs" Inherits="caltaxil" %>
<ul id="accordion">
    <li>Pick Up Add.</li>
    <ul>
        <p>
            <asp:Label ID="lbl_customer" runat="server" Text="No Recorded Address" ForeColor="#F0F0F0"></asp:Label>
            <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Select" Visible="false"
                BackColor="#151613" BorderColor="#FFF000" ForeColor="#FFF000" />
        </p>
        <table>
            <tr>
                <td>
                    <asp:Label ID="lbl_PAcity" runat="server" Text="City" AssociatedControlID="drp_PAcity"
                        ForeColor="#F0F0F0"></asp:Label>
                </td>
                <td>
                    <asp:Label ID="lbl_PAtown" runat="server" Text="Town" AssociatedControlID="drp_PAtown"
                        ForeColor="#F0F0F0"></asp:Label>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:DropDownList ID="drp_PAcity" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1"
                        DataTextField="Name" DataValueField="CityID" OnSelectedIndexChanged="drp_PAcity_SelectedIndexChanged"
                        CssClass="tb5">
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:DropDownList ID="drp_PAtown" runat="server" DataSourceID="SqlDataSource2" DataTextField="Name"
                        DataValueField="TownID" CssClass="tb5">
                    </asp:DropDownList>
                </td>
            </tr>
        </table>
        <p>
            <asp:Label ID="lbl_PAext" runat="server" Text="Extra Informatıon" AssociatedControlID="txt_PAadd"
                ForeColor="#F0F0F0"></asp:Label>
        </p>
        <p>
            <asp:TextBox ID="txt_PAadd" class="txt_PAadd" runat="server" Width="300px" Height="35"
                Font-Size="Large" Font-Bold="True" ValidationGroup="callok" BackColor="White"
                CssClass="tb5"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Need more information"
                ControlToValidate="txt_PAadd" ForeColor="#FFF000" ValidationGroup="callok"></asp:RequiredFieldValidator>
            <br />
            <asp:Label ID="lbl_note" runat="server" Text="Notes" ForeColor="#F0F0F0"></asp:Label>
        </p>
        <p>
            <asp:TextBox ID="txt_note" runat="server" Width="300px" Height="35" Font-Size="Large"
                Font-Bold="True" CssClass="tb5"></asp:TextBox>
        </p>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:conn %>"
            SelectCommand="SELECT [Name], [CityID] FROM [City]"></asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:conn %>"
            SelectCommand="SELECT Name, CityID, TownID FROM dbo.Town WHERE (CityID = @CityID)">
            <SelectParameters>
                <asp:ControlParameter ControlID="drp_PAcity" Name="CityID" PropertyName="SelectedValue"
                    Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </ul>
    <li>Arrive Add.</li>
    <ul>
        <p>
        </p>
        <p>
            <table>
                <tr height="20">
                    <td>
                        <asp:Label ID="lbl_AAtown" runat="server" Text="Town" Style="top: 100px; left: 110px;"></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="drp_AAtown" runat="server" Style="top: 140px; left: 110px;"
                            DataSourceID="SqlDataSource4" DataTextField="Name" DataValueField="TownID" CssClass="tb5">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lbl_AAextbel6" runat="server" Text="Extra Informatıon" Style="top: 100px;
                            left: 240px;"></asp:Label>
                    </td>
                    </td>
                    <td>
                        <asp:TextBox ID="txt_AAadd" runat="server" Width="300px" Height="35" Style="top: 130px;
                            left: 240px;" Font-Size="Large" Font-Bold="True" ValidationGroup="callok" CssClass="tb5"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Need more information"
                            ControlToValidate="txt_AAadd" ForeColor="#FFF000" ValidationGroup="callok"></asp:RequiredFieldValidator>
                    </td>
                </tr>
            </table>
        </p>
        <p>
            <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:conn %>"
                SelectCommand="SELECT [TownID], [Name], [CityID] FROM [Town] WHERE ([CityID] = @CityID)">
                <SelectParameters>
                    <asp:ControlParameter ControlID="drp_PAcity" DefaultValue="1" Name="CityID" 
                        PropertyName="SelectedValue" Type="Int32" />
                </SelectParameters>
            </asp:SqlDataSource>
        </p>
    </ul>
    <li>Call Taxi</li>
    <ul>
        <p>
            <br />
        </p>
        Security Code:
        <br />
        <img src="captcha.aspx" border="0" />
        <br />
        <asp:TextBox ID="txt_cptch" runat="server" CssClass="tb5"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="This field can not be empty"
            ControlToValidate="txt_cptch" ForeColor="Yellow" ValidationGroup="callok"></asp:RequiredFieldValidator>
        <li>
            <br />
        </li>
        <br />
        <asp:Button ID="Button1" runat="server" Text="Call TAXI" OnClick="Button1_Click"
            BackColor="#151613" BorderColor="Yellow" BorderStyle="Double" BorderWidth="1"
            ToolTip="Call Taxi" ForeColor="Yellow" Font-Size="Larger" ValidationGroup="callok" />
        <br />
    </ul>
</ul>
<br />
<asp:Label ID="Label1" runat="server" Font-Bold="True" ForeColor="#FFFFFF"></asp:Label>
<asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:conn %>"
    SelectCommand="SelectTaxiByTownIdAndCL" SelectCommandType="StoredProcedure">
    <SelectParameters>
        <asp:Parameter Name="CL" Type="Int32" />
        <asp:Parameter Name="TownID" Type="Int32" />
        <asp:Parameter Name="Available" Type="String" />
    </SelectParameters>
</asp:SqlDataSource>
<script>
    $("#accordion > li").click(function () {

        if (false == $(this).next().is(':visible')) {
            $('#accordion > ul').slideUp(300);
        }
        $(this).next().slideToggle(300);
    });

    $('#accordion > ul:eq(0)').show();

</script>
